home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0495.lzh / AMOSLIST / 000024_amos-request@svcs1.digex.net_Wed Apr 5 14:27:06 1995.msg < prev    next >
Internet Message Format  |  1995-05-01  |  3KB

  1. Received: from svcs1.digex.net by nfs1.digex.net with SMTP id AA00760
  2.   (5.67b8/IDA-1.5); Wed, 5 Apr 1995 14:27:03 -0400
  3. Received: by svcs1.digex.net id AA13162
  4.   (5.67b8/IDA-1.5 for amos-out); Wed, 5 Apr 1995 10:08:23 -0400
  5. Received: from nfs2.digex.net by svcs1.digex.net with SMTP id AA13156
  6.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Wed, 5 Apr 1995 10:08:20 -0400
  7. Received: from wn1.sci.kun.nl by nfs2.digex.net with SMTP id AA29898
  8.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Wed, 5 Apr 1995 10:08:17 -0400
  9. Received: from mpih17 by wn1.sci.kun.nl via mpih17.mpi.nl [192.87.79.57] with SMTP 
  10.     id QAA02329 (8.6.10/2.9) for <amos-list@access.digex.net>; Wed, 5 Apr 1995 16:08:14 +0200
  11. Received: from mpipc31.mpi.nl by mpih17 (1.38.193.4/2.1) on NUNET
  12.      id AA03809; Wed, 5 Apr 1995 16:08:23 +0200
  13. Date: Wed, 5 Apr 1995 16:11:49 PDT
  14. From: "Video-room antr. (606)" <bcollin@mpi.nl>
  15. Subject: Re: Collision detection...
  16. To: amos-list@access.digex.net
  17. Message-Id: <ECS9504051649A@mpi.nl>
  18. Priority: Normal
  19. Mime-Version: 1.0
  20. Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
  21. Status: O
  22. X-Status: 
  23.  
  24. On Tue, 04 Apr 1995 20:39:15 -0500 (EST) M. Jeremy Trammell wrote:
  25.  
  26. >     I'm working on a game that is basically a side view fast 
  27. action air-
  28. > -plane type game. My problem, is that the landscape below you is 
  29. drawn (ie
  30. > it's just a picture...), and your plane is a bob. Any suggestions as 
  31. to how
  32. > to detect collisions between the two?
  33. >     Some of my own ideas->
  34. > 1) One color is devoted entirely to the "sky" so I can check various 
  35. points in
  36. > the background around yoyuur plane to see if they are "non-sky" 
  37. colors....Thus
  38. > denoting a collision.
  39. > 2) TAnother possibility is to have a special data file of some 
  40. sorts that would
  41. > hold the altitude of any particular point of land... Checking the 
  42. file against
  43. > your planes altitude would be a possibility.
  44. > Both of theses methods have unsatisfactory side effects.... So any 
  45. suggestions or 
  46. > improvements would be welcome!
  47.  
  48. Since this is a really, frequently asked question I have had enough 
  49. time to give it some thought. I came up with a solution that I have 
  50. never tried, so you 'll risk typing in something totally worthless.
  51.  
  52. My idea was to use reserved colours for the detectable background, 
  53. then copy the reserved bitplanes of the background behind your plane 
  54. to a second screen, make it a bob and put that bob on the playscreen. 
  55. Now you should be able to do a bob collision test.
  56.  
  57. Example
  58.  
  59. char             colour number                status
  60. in                  
  61. ascii
  62. pic
  63.  
  64.  0                        0           non-mask colour
  65.  .                        4           non-detect background
  66.  /                        1           detectable background
  67.  *                        2           airplane bob
  68.  
  69. start situation
  70.  
  71. ..........
  72. ...***..//
  73. .......///
  74. //..//////
  75. //////////
  76.  
  77. Now Screen Copy the first bitplane of the rectangle directly around 
  78. your playing bob to a second screen:
  79.  
  80. 00000
  81. 00000
  82. 00000
  83.  
  84. Make it a bob and put it back on the play-screen.
  85.  
  86. ..........
  87. ...***..//
  88. .......///
  89. //..//////
  90. //////////
  91.  
  92. It SHOULD be invisible. At this point it does not detect anything.
  93. However, if the plane moves forward it will collide with the 'hill'.
  94.  
  95. This might not work. There are however a lot of game programmers here, 
  96. so someone should be to help.
  97.  
  98. Branko Collin
  99. bcollin@mpi.nl
  100.  
  101.